<style>
  .affiliate-title .title {
    text-align: left;
  }
</style>
<div class="affiliate-faq-all">
  <div class="{% unless section.settings.full_width %}page-width{% endunless %}">
      {%- if section.settings.heading != blank -%}
      {%- if section.settings.heading != blank -%}
      <div class="affiliate-title">
         <div class="title">
             {{ section.settings.heading | escape }}
          </div> 
      </div>
    {%- endif -%}
     {%- endif -%}
     <div class="affiliate-faq">
      {%- for block in section.blocks -%}
      <div class="faq__accordion" {{ block.shopify_attributes }}>
          <details {% if block.settings.is_open == true %} open {% endif %}>
            <summary>
              <div class="summary__title">
                {{ block.settings.title }}
              </div>
             <div class="ten-summary">
              {% render 'icon-jia' %}
              {% render 'icon-jian' %}
             </div>
            </summary>
            <div class="accordion__content rte">
              {{ block.settings.text  }}
            </div>
            {% if block.settings.text1 != blank %}
              <div class="accordion__content rte">
                {{ block.settings.text1  }}
              </div>
            {% endif %}
            {% if block.type == 'Faq_Table' %}
              <div class="faq-table">
                <table width="100%">
                  <thead>
                    <tr>
                      <th>
                        {% if block.settings.table_title1 != blank %}
                          {{ block.settings.table_title1 }}
                        {% endif %}
                      </th>
                      <th>
                        {% if block.settings.table_title2 != blank %}
                          {{ block.settings.table_title2 }}
                        {% endif %}
                      </th>
                    </tr>
                  </thead>
                  <tbody>
                    {% if block.settings.table_span1_col1_desc != blank or block.settings.table_span1_col2_desc != blank %}
                      <tr>
                        <td>
                          {% if block.settings.table_span1_col1_desc != blank %}
                            {{ block.settings.table_span1_col1_desc }}
                          {% endif %}
                        </td>
                        <td>
                          {% if block.settings.table_span1_col2_desc != blank %}
                            <a href="{{ block.settings.table_span1_col2_link }}" target="_blank" title="{{ block.settings.table_span1_col1_desc }}" rel="noopener noreferrer">{{ block.settings.table_span1_col2_desc }}</a>
                          {% endif %}
                        </td>
                      </tr>
                    {% endif %}
                    {% if block.settings.table_span2_col1_desc != blank or block.settings.table_span2_col2_desc != blank %}
                      <tr>
                        <td>
                          {% if block.settings.table_span2_col1_desc != blank %}
                            {{ block.settings.table_span2_col1_desc }}
                          {% endif %}
                        </td>
                        <td>
                          {% if block.settings.table_span2_col2_desc != blank %}
                            <a href="{{ block.settings.table_span2_col2_link }}" target="_blank" title="{{ block.settings.table_span2_col1_desc }}" rel="noopener noreferrer">{{ block.settings.table_span2_col2_desc }}</a>
                          {% endif %}
                        </td>
                      </tr>
                    {% endif %}
                    {% if block.settings.table_span3_col1_desc != blank or block.settings.table_span3_col2_desc != blank %}
                      <tr>
                        <td>
                          {% if block.settings.table_span3_col1_desc != blank %}
                            {{ block.settings.table_span3_col1_desc }}
                          {% endif %}
                        </td>
                        <td>
                          {% if block.settings.table_span3_col2_desc != blank %}
                            <a href="{{ block.settings.table_span3_col2_link }}" target="_blank" title="{{ block.settings.table_span3_col1_desc }}" rel="noopener noreferrer">{{ block.settings.table_span3_col2_desc }}</a>
                          {% endif %}
                        </td>
                      </tr>
                    {% endif %}
                    {% if block.settings.table_span4_col1_desc != blank or block.settings.table_span4_col2_desc != blank %}
                      <tr>
                        <td>
                          {% if block.settings.table_span4_col1_desc != blank %}
                            {{ block.settings.table_span4_col1_desc }}
                          {% endif %}
                        </td>
                        <td>
                          {% if block.settings.table_span4_col2_desc != blank %}
                            <a href="{{ block.settings.table_span4_col2_link }}" target="_blank" title="{{ block.settings.table_span4_col1_desc }}" rel="noopener noreferrer">{{ block.settings.table_span4_col2_desc }}</a>
                          {% endif %}
                        </td>
                      </tr>
                    {% endif %}
                    {% if block.settings.table_span5_col1_desc != blank or block.settings.table_span5_col2_desc != blank %}
                      <tr>
                        <td>
                          {% if block.settings.table_span5_col1_desc != blank %}
                            {{ block.settings.table_span5_col1_desc }}
                          {% endif %}
                        </td>
                        <td>
                          {% if block.settings.table_span5_col2_desc != blank %}
                            <a href="{{ block.settings.table_span5_col2_link }}" target="_blank" title="{{ block.settings.table_span5_col1_desc }}" rel="noopener noreferrer">{{ block.settings.table_span5_col2_desc }}</a>
                          {% endif %}
                        </td>
                      </tr>
                    {% endif %}
                    {% if block.settings.table_span6_col1_desc != blank or block.settings.table_span6_col2_desc != blank %}
                      <tr>
                        <td>
                          {% if block.settings.table_span6_col1_desc != blank %}
                            {{ block.settings.table_span6_col1_desc }}
                          {% endif %}
                        </td>
                        <td>
                          {% if block.settings.table_span6_col2_desc != blank %}
                            <a href="{{ block.settings.table_span6_col2_link }}" target="_blank" title="{{ block.settings.table_span6_col1_desc }}" rel="noopener noreferrer">{{ block.settings.table_span6_col2_desc }}</a>
                          {% endif %}
                        </td>
                      </tr>
                    {% endif %}
                  </tbody>
                </table>
              </div>
            {% endif %}
          </details>
        </div>
        {%- endfor -%}
      </div>
  </div>
</div>

{% schema %}
{
"name": "Affiliate Faq",
"tag": "section",
"class": "spaced-section spaced-section--full-width",
"settings": [
{
  "type": "text",
  "id": "heading",
  "default": "Talk about your brand",
  "label": "Heading"
},
{
  "type": "checkbox",
  "id": "full_width",
  "default": false,
  "label": "t:sections.rich-text.settings.full_width.label"
}
],
"blocks": [
{
  "type": "Faq",
  "name": "Faq",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "default": "Faq",
      "label": "Faq"
    },
    {
      "type": "richtext",
      "id": "text",
      "label": "Des"
    },
    {
      "type": "html",
      "id": "text1",
      "label": "Des1"
    },
    {
      "type": "checkbox",
      "id": "is_open",
      "label": "Open By Default",
      "default": false
    }
  ]
},
{
  "type": "Faq_Table",
  "name": "Faq Table",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "default": "Faq",
      "label": "Faq"
    },
    {
      "type": "richtext",
      "id": "text",
      "label": "Des"
    },
    {
      "type": "text",
      "id": "table_title1",
      "label": "table col1 title"
    },
    {
      "type": "text",
      "id": "table_title2",
      "label": "table col2 title"
    },
    {
      "type": "text",
      "id": "table_span1_col1_desc",
      "label": "table span1 col1 desc"
    },
    {
      "type": "text",
      "id": "table_span1_col2_desc",
      "label": "table span1 col2 desc"
    },
    {
      "type": "text",
      "id": "table_span1_col2_link",
      "label": "table span1 col2 link"
    },
    {
      "type": "text",
      "id": "table_span2_col1_desc",
      "label": "table span2 col1 desc"
    },
    {
      "type": "text",
      "id": "table_span2_col2_desc",
      "label": "table span2 col2 desc"
    },
    {
      "type": "text",
      "id": "table_span2_col2_link",
      "label": "table span2 col2 link"
    },
    {
      "type": "text",
      "id": "table_span3_col1_desc",
      "label": "table span3 col1 desc"
    },
    {
      "type": "text",
      "id": "table_span3_col2_desc",
      "label": "table span3 col2 desc"
    },
    {
      "type": "text",
      "id": "table_span3_col2_link",
      "label": "table span3 col2 link"
    },
    {
      "type": "text",
      "id": "table_span4_col1_desc",
      "label": "table span4 col1 desc"
    },
    {
      "type": "text",
      "id": "table_span4_col2_desc",
      "label": "table span4 col2 desc"
    },
    {
      "type": "text",
      "id": "table_span4_col2_link",
      "label": "table span4 col2 link"
    },
    {
      "type": "text",
      "id": "table_span5_col1_desc",
      "label": "table span5 col1 desc"
    },
    {
      "type": "text",
      "id": "table_span5_col2_desc",
      "label": "table span5 col2 desc"
    },
    {
      "type": "text",
      "id": "table_span5_col2_link",
      "label": "table span5 col2 link"
    },
    {
      "type": "text",
      "id": "table_span6_col1_desc",
      "label": "table span6 col1 desc"
    },
    {
      "type": "text",
      "id": "table_span6_col2_desc",
      "label": "table span6 col2 desc"
    },
    {
      "type": "text",
      "id": "table_span6_col2_link",
      "label": "table span6 col2 link"
    }
  ]
}
],
"presets": [
  {
    "name": "Affiliate faq"
  }
]
}
{% endschema %}
